package org.pp.miniapp.dto;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
import org.pp.entity.PpUserAddress;

@Setter
@Getter
public class UserAddressEdite {

    @TableId(value = "address_id", type = IdType.AUTO)
    private Long addressId;

    @Schema(description = "完整地址")
    private String location;

    @Schema(description = "手机号")
    private String phone;

    @Schema(description = "地区 json array")
    @TableField(typeHandler = JacksonTypeHandler.class)
    private PpUserAddress.Area[] area;

    @Schema(description = "详细地址（不含地区)")
    private String detail;

    @Schema(description = "设置默认")
    private Boolean ifDefault;

    @Schema(description = "收件人姓名")
    private String name;
}
